// node_js中间件

var express = require('express')
var app = express();


// 解决跨域问题
app.all('*',function(req,res,next){
    res.header("Access-Control-Allow-Origin","*");
    res.header("Access-Control-Allow-Headers","X-Requested-With");
    res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
    res.header("X-Powered-By",'3.2.1')
    res.header("Content-Type","application/json;charset=utf-8");
    next();
});

app.get('/get_tablist',function(req,res){
    var tabBtnList = ['推荐',"数码产品",'书籍','潮鞋潮服','美妆护肤','服饰包包','生活工具']
    res.send(tabBtnList);
});

app.listen(6632,function(){
    console.log('6666,中间件正在运行');
});